public class PC {
    CPU cpu;
    HardDisk harddisk;
     public CPU getCpu() {
      return cpu;
  }
  public HardDisk getHarddisk() {
      return harddisk;
  }
    public void show(){
        System.out.println("PC的cpu速度为："+cpu.speed);
        System.out.println("PC的硬盘容量为："+harddisk.amount);
    }
    public void setCpu(CPU cpu) {
        this.cpu = cpu;
    }
    public void setHarddisk(HardDisk harddisk) {
        this.harddisk = harddisk;
    }
    public PC(CPU cpu, HardDisk harddisk) {
        this.cpu = cpu;
        this.harddisk = harddisk;
    }
    public PC() {
    }
}